package org.lyh.gift.client.fallback;

import feign.hystrix.FallbackFactory;
import org.lyh.gift.client.LoginUserFeignClient;
import org.lyh.gift.domain.LoginUser;
import org.lyh.gift.util.AjaxResult;

public class LoginUserFeignClientFallback implements FallbackFactory<LoginUserFeignClient> {
    @Override
    public LoginUserFeignClient create(Throwable throwable) {
        return new LoginUserFeignClient() {
            @Override
            public AjaxResult addOrUpdate(LoginUser loginUser) {
                return AjaxResult.me().setSuccess(false);
            }
        };
    }
}
